76

Beginner’s Guide to Code Algorithms

76

STEP 2—​read input and take action (continued)

ActivePresentation.Slides(ActivePresentation.SlideShowWindow.View.

CurrentShowPosition).Delete

            NextSlide

            WhiteScreen =​ 0

           

            End If

          Else

            If InStr(CommandWord, “N”) > 0 Then

              NextSlide

              SlideNumber =​ SlideNumber +​ 1

            Else

              If InStr(CommandWord, “P”) > 0 Then

                PreviousSlide

                SlideNumber =​ SlideNumber -​ 1

              Else

                d =​ InStr(CommandWord, “#”)

                If d > 0 Then

                  e =​ InStr(d +​ 1, CommandWord, “#”)

                  If e > 0 Then

                    ShowText =​ Mid(CommandWord, d +​ 1, e -​ d -​ 1)

                    SlideNumber =​ ActivePresentation.SlideShowWindow.View.

CurrentShowPosition

                  Call AddCallout(ShowText, SlideNumber)

                  ShowText =​ ““

                  FirstT =​ 0

                 

                Else

                FirstT =​ 1

                ShowText =​ Mid(CommandWord, d +​ 1, 100)

                SlideNumber =​ ActivePresentation.SlideShowWindow.View.

CurrentShowPosition

                Call AddCallout(ShowText, SlideNumber)

              End If

:

:

:

              Else

            End If

          End If

        End If

      End If

    Else

        d =​ InStr(CommandWord, “#”)

        If d > 0 Then

          ShowText =​ ShowText & Mid(CommandWord, 1, d -​ 1)

          SlideNumber =​ ActivePresentation.SlideShowWindow.View.

CurrentShowPosition

          Call AddCallout(ShowText, SlideNumber)

          If LaunchLink =​ 1 Then